object Translation {
  def main(args: Array[String]): Unit = {

    val w = Map(
      "来" -> "come",
      "去" -> "go",
      "点头" -> "yes",
      "摇头" -> "no"
    )

    val reverseMap = w.map(_.swap)

    print("请输入要翻译的英文单词: ")
    val input = scala.io.StdIn.readLine()

    reverseMap.get(input) match {
      case Some(translation) => println(s"对应的中文是: $translation")
      case None => println("未找到对应的中文翻译。")
    }
  }
}